CC = iccavr
LIB = ilibw
CFLAGS =  -e -D__ICC_VERSION=722 -DATMega16  -l -g -MLongJump -MHasMul -MEnhanced 
ASFLAGS = $(CFLAGS) 
LFLAGS =  -g -e:0x4000 -ucrtatmega.o -bfunc_lit:0x54.0x4000 -dram_end:0x45f -bdata:0x60.0x45f -dhwstk_size:30 -beeprom:0.512 -fihx_coff -S2
FILES = slave1.o delay.o servo.o usart.o 

SLAVE1:	$(FILES)
	$(CC) -o SLAVE1 $(LFLAGS) @SLAVE1.lk   -lcatmega
slave1.o: D:\iccavr\include\iom16v.h D:\iccavr\include\macros.h D:\iccavr\include\AVRdef.h .\delay.h .\servo.h .\usart.h
slave1.o:	slave1.c
	$(CC) -c $(CFLAGS) slave1.c
delay.o: .\delay.h
delay.o:	delay.c
	$(CC) -c $(CFLAGS) delay.c
servo.o: .\servo.h D:\iccavr\include\iom16v.h D:\iccavr\include\macros.h D:\iccavr\include\AVRdef.h
servo.o:	servo.c
	$(CC) -c $(CFLAGS) servo.c
usart.o: .\usart.h D:\iccavr\include\iom16v.h D:\iccavr\include\macros.h D:\iccavr\include\AVRdef.h .\delay.h
usart.o:	usart.c
	$(CC) -c $(CFLAGS) usart.c
